#!/bin/sh
# The script is to find the file in which install rpm package

VERBOSE=0
PRG=$1
if [ "$1" == "-v" ]
then
VERBOSE=1
PRG=$2
fi
for PKG_NAME in $(rpm -qa)
do
   rpm -ql $PKG_NAME | grep -q $PRG
   if [ $? -eq 0 ]
   then
       echo $PRG is belong to $PKG_NAME
       if [ $VERBOSE -eq 1 ]
       then
           echo `rpm -ql $PKG_NAME | grep $PRG` 
       fi
   fi
   done

